#include <stdio.h>

int main(int argc, char const *argv[])
{
    int A,B;
    int count = 0;

    printf("请输入A,B的值：\n");
    scanf("%d %d",&A,&B);

    int c = A ^ B;
    while(c)
    {
        c &= c - 1;
        count++;
    }
    printf("%d\n",count);
    return 0;
}
